import request from '@/utils/request'
export const login = ({ username, password }) => {
  return request({
    method: 'post',
    url: '/adminLogin',
    data: {
      username,
      password
    }
  })
}
// 获取所有管理员信息
export const getAdminAPI = () => {
  return request({
    method: 'GET',
    url: '/admin'
  })
}
// 增加管理员
export const addAdminAPI = () => {
  return request({
    method: 'GET',
    url: '/admin'
  })
}
// 根据id删除管理员
export const delAdminAPI = (id) => {
  return request({
    method: 'DELETE',
    url: `/admin/update/${id}`
  })
}
// 根据id修改管理员信息
export const ipdateAdminAPI = () => {
  return request({
    method: 'GET',
    url: '/admin'
  })
}
